package java_class_work.week05;

import java.io.*;

/**
 * @Auther: admin
 * @Date: 2022/10/11 11:14
 * @Description: InputStreamReader
 */
public class InputStreamDemo {
    public static void main(String[] args) {
        String fileName = ".\\src\\java_class_work\\iotest\\writer.txt";
        try {
            InputStreamReader ipsr = new InputStreamReader(new FileInputStream(fileName));
            char[] chars = new char[1024];
            int len = ipsr.read(chars);
            System.out.println(new String(chars, 0, len));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
